Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(autoware_multi_object_tracker): fix bugprone-errors #9651

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

kobayu858
Copy link
Contributor

Description

This is a fix based on clang-tidy bugprone-branch-clone and bugprone-reserved-identifier error.

/home/emb4/autoware/autoware/src/universe/autoware.universe/perception/autoware_multi_object_tracker/lib/tracker/model/bicycle_tracker.cpp:211:43: error: repeated branch in conditional chain [bugprone-branch-clone,-warnings-as-errors]
    object.shape.dimensions.z > size_max) {
                                          ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/perception/autoware_multi_object_tracker/lib/tracker/model/bicycle_tracker.cpp:213:4: note: end of the original
  } else if (
   ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/perception/autoware_multi_object_tracker/lib/tracker/model/bicycle_tracker.cpp:215:43: note: clone 1 starts here
    object.shape.dimensions.z < size_min) {
                                          ^

/home/emb4/autoware/autoware/src/universe/autoware.universe/perception/autoware_multi_object_tracker/src/processor/input_manager.cpp:267:56: error: repeated branch in conditional chain [bugprone-branch-clone,-warnings-as-errors]
    latest_exported_object_time_ > object_latest_time) {
                                                       ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/perception/autoware_multi_object_tracker/src/processor/input_manager.cpp:270:4: note: end of the original
  } else if (latest_exported_object_time_ > object_latest_time) {
   ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/perception/autoware_multi_object_tracker/src/processor/input_manager.cpp:270:65: note: clone 1 starts here
  } else if (latest_exported_object_time_ > object_latest_time) {
                                                                ^

/home/emb4/autoware/autoware/src/universe/autoware.universe/perception/autoware_multi_object_tracker/lib/tracker/motion_model/bicycle_motion_model.cpp:318:16: error: declaration uses identifier 'vv_dtdt__lr', which is a reserved identifier [bugprone-reserved-identifier,-warnings-as-errors]
  const double vv_dtdt__lr = vel * vel * dt * dt / lr_;
               ^~~~~~~~~~~
               vv_dtdt_lr

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: kobayu858 <[email protected]>
@github-actions github-actions bot added component:perception Advanced sensor data processing and environment understanding. (auto-assigned) tag:require-cuda-build-and-test labels Dec 16, 2024
Copy link

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@kobayu858 kobayu858 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 16, 2024
@kobayu858 kobayu858 requested a review from veqcc December 16, 2024 01:46
Copy link
Contributor

@technolojin technolojin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 29.87%. Comparing base (86ba21f) to head (d701ed8).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
.../lib/tracker/motion_model/bicycle_motion_model.cpp 0.00% 3 Missing ⚠️
...ject_tracker/lib/tracker/model/bicycle_tracker.cpp 0.00% 2 Missing ⚠️
...lti_object_tracker/src/processor/input_manager.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9651      +/-   ##
==========================================
- Coverage   29.88%   29.87%   -0.01%     
==========================================
  Files        1440     1440              
  Lines      108347   108355       +8     
  Branches    42467    42467              
==========================================
  Hits        32376    32376              
- Misses      72730    72738       +8     
  Partials     3241     3241              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 29.88% <ø> (+<0.01%) ⬆️ Carriedforward from 86ba21f

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kobayu858 kobayu858 merged commit 51a74c6 into autowarefoundation:main Dec 16, 2024
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) tag:require-cuda-build-and-test tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants